<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="format-detection" content="telephone=no"/>
<meta name="wap-font-scale" content="no">
<meta name="renderer" content="webkit">
<title>AutoCode</title>
<link rel="shortcut icon" href="/favicon.ico" />
<script src="/links/jquery/jquery-3.5.1.min.js"></script>
<script src="/links/polyfill.min.js"></script>
<script src="/links/axios/axios.min.js"></script>
<script src="/links/vue/vue.min.js"></script>
<script src="/links/element-ui/index.js"></script>
<script src="/links/dayjs.min.js"></script>
<script src="/links/echarts/echarts.min.js"></script>
<script src="/links/JsBarcode.all.js"></script>
<script src="/links/qrcode.min.js"></script>
<script src="/links/layer/layer.js"></script>
<script src="/js/dragController.js"></script>
<script src="/js/HttpApi.js"></script>
<script src="/js/AutoCode.js"></script>
<link href="/links/element-ui/theme/index.css" rel="stylesheet"/>
<link href="/css/default.css" rel="stylesheet"/>
<link href="/css/dragController.css" rel="stylesheet"/>

<script src="/links/ace/src/ace.js"></script>
<script src="/links/ace/src/ext-language_tools.js"></script>
<script src="/links/beautify/beautify.min.js"></script>
<script src="/links/beautify/beautify-css.min.js"></script>
<script src="/links/beautify/beautify-html.min.js"></script>
    <style>
        
    </style>
</head>
<body>
<div id="app"  class="box" >
<div class="flex ac-table-head">
    <div class="ac-table-oper"><el-button size="medium"  v-if="processed.operVisible.buttonQ==undefined || processed.operVisible.buttonQ" @click="processed_load()" :disabled="processed.operDisabled.buttonQ"  type="text"     native-type="button">刷新(Q)</el-button>
</div>
    <div></div>
</div>
<div class="ac-table-content2">
    <el-table row-key="id" highlight-current-row stripe show-header border  
    :data="processed.data" size="mini" ref="processed"
       
    height="100%"
    @current-change="processed_currentChange">
    <el-table-column type="index" width="50" label="序号"></el-table-column>
<el-table-column prop="wfName" label="任务名称"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        {{scope.row.wfName}}
   </template>
</el-table-column>
<el-table-column prop="stepName" label="审批环节"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        {{scope.row.stepName}}
   </template>
</el-table-column>
<el-table-column prop="actionName" label="操作名称"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        {{scope.row.actionName}}
   </template>
</el-table-column>
<el-table-column prop="auditComment" label="审批意见"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        <pre style="white-space: pre-wrap;">{{scope.row.auditComment}}</pre>
   </template>
</el-table-column>
<el-table-column prop="toStepcode" label="下一步骤"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        {{scope.row.toStepcode}}
   </template>
</el-table-column>
<el-table-column prop="multiaudit" label="是否会签"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        {{scope.row.multiaudit}}
   </template>
</el-table-column>
<el-table-column prop="status" label="状态"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
        {{scope.row.status}}
   </template>
</el-table-column>
<el-table-column prop="fromTime" label="进入时间"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
         <template v-if="scope.row.fromTime">
 <i class="el-icon-time"></i> {{dayjs(scope.row.fromTime).format("YYYY-MM-DD HH:mm:ss")}}
</template>

   </template>
</el-table-column>
<el-table-column prop="toTime" label="离开时间"    align="left"  show-overflow-tooltip >
   <template slot-scope="scope">
         <template v-if="scope.row.toTime">
 <i class="el-icon-time"></i> {{dayjs(scope.row.toTime).format("YYYY-MM-DD HH:mm:ss")}}
</template>

   </template>
</el-table-column>

</el-table>

</div>
<div class="flex">
    <div></div>
    <div> <el-pagination
      @size-change="processed_pageSizeChange"
      @current-change="processed_pageCurrentChange"
      :current-page="processed.pagingData.currentPage"
      :page-sizes="processed.pagingData.pageSizes"
      :page-size="processed.pagingData.pageSize"
      layout="total, sizes, prev, pager, next"
      :total="processed.pagingData.total"
       
      >
    </el-pagination>
</div>
</div>


</div>

</body>
<script th:inline="javascript">
    let vm = new Vue({
            el: '#app',
            data() {
                return {"processed":{"title":"已处理任务","currentRow":{},"data":[],"expandRowKeys":[],"pagingData":{"currentPage":1,"total":0,"pageSize":20,"pageSizes":[10,20,30,40,50,100]},"operData":{},"operVisible":{},"operDisabled":{},"rawData":[],"itemVisible":{},"operDialogVisible":false},"page":{},"tabDisabled":{},"tabVisible":{},"customOptions":{},"dictOptions":{}}
            },
            watch: {
},
            methods: {
processed_pageSizeChange:function(pageSize){
    this.processed.pagingData.pageSize=pageSize;
    this.processed_load();
}
,
processed_load:function(){
    let that = this;
    HttpApi.queryPaging("autocodeWfRecordStep",this.processed.pagingData,this.processed.operData,function(res){
        that.processed.data  = res;
        if(that.processed.data.length>0){
            that.$refs.processed.setCurrentRow(that.processed.data[0]);
            that.processed_operCtrl(that.processed.data[0]);
        }else{
             that.$refs.processed.setCurrentRow();
             that.processed_operCtrl();
        }
    });
},
processed_change:function(fieldName,row){
    HttpApi.updateProvider("autocodeWfRecordStep",fieldName,row,function(){
                        
    });
},
processed_currentChange:function(currentRow){
    if(!currentRow){
        //如果没有传入值，则将当前的选中值清空
        this.$data.processed.currentRow = this.$options.data().processed.currentRow;
    }else{
        this.processed.currentRow = currentRow;
    }
    this.processed_operCtrl(currentRow);
},
processed_operCtrl:function(currentRow) {
    /**
    * operDisabled：控制按钮的是否禁止操作，true代表禁止操作，false代表允许操作
    * this.$set(this.stdSolReceiveHistory.operDisabled, "buttonE", true);
    * operVisible：控制按钮是否显示，true代表显示，false代表不显示
    * this.$set(this.stdSolReceiveHistory.operVisible, "buttonE", false);
    */
    if(!currentRow) {
       
    }else {
       
    }
},
processed_pageCurrentChange:function(currentPage){
    this.processed.pagingData.currentPage=currentPage;
    this.processed_load();
}

},
            mounted: function(){
    dragControllerLR();
    dragControllerUD();
},
            created: function(){
    let that=this;
    //获取字典信息
    HttpApi.dictOptions([],function(res){
        that.dictOptions=res;
    });

    //加载自定义数据字典
    

    //加载初始化load
    this.processed_load();


    //加载初始化方法
    
}
    });
</script>
</html>
